package com.tcm.consultation.dao.mapper;


import com.tcm.consultation.entity.Consultation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ConsultationMapper {
    int deleteById(Long id);

    int deleteLogicById(Long id);

    int insert(Consultation record);

    Consultation findById(Long id);

    int update(Consultation record);

    List<Consultation> listPageByDoctorId(@Param("doctorId") Long doctorId, @Param("status") Byte status,
                                          @Param("offset") Long offset,  @Param("pagesize") Long pagesize);

    Long countByDoctorId(@Param("doctorId") Long doctorId, @Param("status") Byte status);

    List<Consultation> listPageByUserId(
            @Param("userId") Long userId, @Param("patientId")Long patientId,@Param("status") Byte status,
            @Param("offset") Long offset,  @Param("pagesize") Long pagesize);

    Long countByUserId(@Param("userId") Long userId, @Param("patientId")Long patientId,@Param("status") Byte status);
}